+Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
+ private _gtk_menu_shell_activate() to encapsulate
+ cut-and-paste code.
+
+ * gtk/gtkmenubar.c: Select the first item on the menu bar
+ for F10 rather than acting as if the user pressed <Alt>F
+ to select the file manager.
+
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
Fix problems with HandleBox and focusing - #78232
+Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
+ private _gtk_menu_shell_activate() to encapsulate
+ cut-and-paste code.
+
+ * gtk/gtkmenubar.c: Select the first item on the menu bar
+ for F10 rather than acting as if the user pressed <Alt>F
+ to select the file manager.
+
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
Fix problems with HandleBox and focusing - #78232
+Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
+ private _gtk_menu_shell_activate() to encapsulate
+ cut-and-paste code.
+
+ * gtk/gtkmenubar.c: Select the first item on the menu bar
+ for F10 rather than acting as if the user pressed <Alt>F
+ to select the file manager.
+
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
Fix problems with HandleBox and focusing - #78232
+Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
+ private _gtk_menu_shell_activate() to encapsulate
+ cut-and-paste code.
+
+ * gtk/gtkmenubar.c: Select the first item on the menu bar
+ for F10 rather than acting as if the user pressed <Alt>F
+ to select the file manager.
+
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
Fix problems with HandleBox and focusing - #78232
+Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
+ private _gtk_menu_shell_activate() to encapsulate
+ cut-and-paste code.
+
+ * gtk/gtkmenubar.c: Select the first item on the menu bar
+ for F10 rather than acting as if the user pressed <Alt>F
+ to select the file manager.
+
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
Fix problems with HandleBox and focusing - #78232
+Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
+ private _gtk_menu_shell_activate() to encapsulate
+ cut-and-paste code.
+
+ * gtk/gtkmenubar.c: Select the first item on the menu bar
+ for F10 rather than acting as if the user pressed <Alt>F
+ to select the file manager.
+
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
Fix problems with HandleBox and focusing - #78232
GTK_DIR_TAB_FORWARD, NULL);
if (menubars)
{
- GtkMenuShell *menushell = GTK_MENU_SHELL (menubars->data);
+ GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
- if (menushell->children)
- {
- gtk_signal_emit_by_name (GTK_OBJECT (menushell->children->data),
- "activate_item");
- retval = TRUE;
- }
+ _gtk_menu_shell_activate (menu_shell);
+ _gtk_menu_shell_select_first (menu_shell);
g_list_free (menubars);
+
+ retval = TRUE;
}
}
{
GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget->parent);
- if (!menu_shell->active)
- {
- gtk_grab_add (GTK_WIDGET (menu_shell));
- menu_shell->have_grab = TRUE;
- menu_shell->active = TRUE;
- }
+ _gtk_menu_shell_activate (menu_shell);
gtk_menu_shell_select_item (GTK_MENU_SHELL (widget->parent), widget);
gtk_menu_item_popup_submenu (widget);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
}
+void
+_gtk_menu_shell_activate (GtkMenuShell *menu_shell)
+{
+ if (!menu_shell->active)
+ {
+ gtk_grab_add (GTK_WIDGET (menu_shell));
+ menu_shell->have_grab = TRUE;
+ menu_shell->active = TRUE;
+ }
+}
+
static gint
gtk_menu_shell_button_press (GtkWidget *widget,
GdkEventButton *event)
}
else if (!menu_shell->active || !menu_shell->button)
{
- if (!menu_shell->active)
- {
- gtk_grab_add (GTK_WIDGET (widget));
- menu_shell->have_grab = TRUE;
- menu_shell->active = TRUE;
- }
+ _gtk_menu_shell_activate (menu_shell);
+
menu_shell->button = event->button;
menu_item = gtk_menu_shell_get_item (menu_shell, (GdkEvent *)event);
gboolean force_deactivate);
void _gtk_menu_shell_select_first (GtkMenuShell *menu_shell);
+void _gtk_menu_shell_activate (GtkMenuShell *menu_shell);
#ifdef __cplusplus
}